3.2.66 \(\int (a+b x) (A+B \log (e (a+b x)^n (c+d x)^{-n}))^3 \, dx\) [166]

3.2.66.1 Optimal result
3.2.66.2 Mathematica [B] (verified)
3.2.66.3 Rubi [A] (warning: unable to verify)
3.2.66.4 Maple [F]
3.2.66.5 Fricas [F]
3.2.66.6 Sympy [F(-2)]
3.2.66.7 Maxima [F]
3.2.66.8 Giac [F]
3.2.66.9 Mupad [F(-1)]

3.2.66.1 Optimal result

Integrand size = 31, antiderivative size = 376 \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3 \, dx=-\frac {3 B^2 (b c-a d)^2 n^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{b d^2}-\frac {3 B (b c-a d) n (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 b d}-\frac {3 B (b c-a d)^2 n \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{2 b d^2}+\frac {(a+b x)^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3}{2 b}-\frac {3 B^3 (b c-a d)^2 n^3 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{b d^2}-\frac {3 B^2 (b c-a d)^2 n^2 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{b d^2}+\frac {3 B^3 (b c-a d)^2 n^3 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )}{b d^2} \]

output
-3*B^2*(-a*d+b*c)^2*n^2*ln((-a*d+b*c)/b/(d*x+c))*(A+B*ln(e*(b*x+a)^n/((d*x 
+c)^n)))/b/d^2-3/2*B*(-a*d+b*c)*n*(b*x+a)*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)) 
)^2/b/d-3/2*B*(-a*d+b*c)^2*n*ln((-a*d+b*c)/b/(d*x+c))*(A+B*ln(e*(b*x+a)^n/ 
((d*x+c)^n)))^2/b/d^2+1/2*(b*x+a)^2*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^3/b- 
3*B^3*(-a*d+b*c)^2*n^3*polylog(2,d*(b*x+a)/b/(d*x+c))/b/d^2-3*B^2*(-a*d+b* 
c)^2*n^2*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))*polylog(2,d*(b*x+a)/b/(d*x+c))/ 
b/d^2+3*B^3*(-a*d+b*c)^2*n^3*polylog(3,d*(b*x+a)/b/(d*x+c))/b/d^2
 
3.2.66.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(2984\) vs. \(2(376)=752\).

Time = 0.74 (sec) , antiderivative size = 2984, normalized size of antiderivative = 7.94 \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3 \, dx=\text {Result too large to show} \]

input
Integrate[(a + b*x)*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^3,x]
 
output
(-12*a^2*A*B^2*d^2*n^2 + 6*a*b*B^3*c*d*n^3 - 6*a^2*B^3*d^2*n^3 + 2*a*A^3*b 
*d^2*x - 3*A^2*b^2*B*c*d*n*x + 3*a*A^2*b*B*d^2*n*x + A^3*b^2*d^2*x^2 + 3*a 
^2*A^2*B*d^2*n*Log[a + b*x] - 6*a*A*b*B^2*c*d*n^2*Log[a + b*x] + 6*a^2*A*B 
^2*d^2*n^2*Log[a + b*x] + 12*a^2*B^3*d^2*n^3*Log[a + b*x] - 3*a^2*A*B^2*d^ 
2*n^2*Log[a + b*x]^2 + 3*a*b*B^3*c*d*n^3*Log[a + b*x]^2 - 3*a^2*B^3*d^2*n^ 
3*Log[a + b*x]^2 + a^2*B^3*d^2*n^3*Log[a + b*x]^3 + 3*A^2*b^2*B*c^2*n*Log[ 
c + d*x] - 6*a*A^2*b*B*c*d*n*Log[c + d*x] + 6*A*b^2*B^2*c^2*n^2*Log[c + d* 
x] - 6*a*A*b*B^2*c*d*n^2*Log[c + d*x] - 12*a^2*B^3*d^2*n^3*Log[c + d*x] - 
6*A*b^2*B^2*c^2*n^2*Log[a + b*x]*Log[c + d*x] + 12*a*A*b*B^2*c*d*n^2*Log[a 
 + b*x]*Log[c + d*x] + 6*a^2*A*B^2*d^2*n^2*Log[a + b*x]*Log[c + d*x] - 6*b 
^2*B^3*c^2*n^3*Log[a + b*x]*Log[c + d*x] + 6*a*b*B^3*c*d*n^3*Log[a + b*x]* 
Log[c + d*x] + 3*b^2*B^3*c^2*n^3*Log[a + b*x]^2*Log[c + d*x] - 6*a*b*B^3*c 
*d*n^3*Log[a + b*x]^2*Log[c + d*x] - 6*a^2*B^3*d^2*n^3*Log[a + b*x]^2*Log[ 
c + d*x] - 6*a^2*A*B^2*d^2*n^2*Log[(d*(a + b*x))/(-(b*c) + a*d)]*Log[c + d 
*x] + 6*a^2*B^3*d^2*n^3*Log[a + b*x]*Log[(d*(a + b*x))/(-(b*c) + a*d)]*Log 
[c + d*x] + 3*A*b^2*B^2*c^2*n^2*Log[c + d*x]^2 - 6*a*A*b*B^2*c*d*n^2*Log[c 
 + d*x]^2 + 3*b^2*B^3*c^2*n^3*Log[c + d*x]^2 - 3*a*b*B^3*c*d*n^3*Log[c + d 
*x]^2 - 6*b^2*B^3*c^2*n^3*Log[a + b*x]*Log[c + d*x]^2 + 12*a*b*B^3*c*d*n^3 
*Log[a + b*x]*Log[c + d*x]^2 + 3*a^2*B^3*d^2*n^3*Log[a + b*x]*Log[c + d*x] 
^2 + 3*b^2*B^3*c^2*n^3*Log[(d*(a + b*x))/(-(b*c) + a*d)]*Log[c + d*x]^2...
 
3.2.66.3 Rubi [A] (warning: unable to verify)

Time = 0.65 (sec) , antiderivative size = 352, normalized size of antiderivative = 0.94, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {2973, 2949, 2781, 2795, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a+b x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )^3 \, dx\)

\(\Big \downarrow \) 2973

\(\displaystyle \int (a+b x) \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )^3dx\)

\(\Big \downarrow \) 2949

\(\displaystyle (b c-a d)^2 \int \frac {(a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^3}{(c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )^3}d\frac {a+b x}{c+d x}\)

\(\Big \downarrow \) 2781

\(\displaystyle (b c-a d)^2 \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^3}{2 b (c+d x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {3 B n \int \frac {(a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )^2}d\frac {a+b x}{c+d x}}{2 b}\right )\)

\(\Big \downarrow \) 2795

\(\displaystyle (b c-a d)^2 \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^3}{2 b (c+d x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {3 B n \int \left (\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d \left (\frac {d (a+b x)}{c+d x}-b\right )}+\frac {b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d \left (\frac {d (a+b x)}{c+d x}-b\right )^2}\right )d\frac {a+b x}{c+d x}}{2 b}\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle (b c-a d)^2 \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^3}{2 b (c+d x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {3 B n \left (\frac {2 B n \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d^2}+\frac {2 B n \log \left (1-\frac {d (a+b x)}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d^2}+\frac {\log \left (1-\frac {d (a+b x)}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{d^2}+\frac {(a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{d (c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )}+\frac {2 B^2 n^2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^2}-\frac {2 B^2 n^2 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )}{d^2}\right )}{2 b}\right )\)

input
Int[(a + b*x)*(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])^3,x]
 
output
(b*c - a*d)^2*(((a + b*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^3)/(2*b 
*(c + d*x)^2*(b - (d*(a + b*x))/(c + d*x))^2) - (3*B*n*(((a + b*x)*(A + B* 
Log[e*((a + b*x)/(c + d*x))^n])^2)/(d*(c + d*x)*(b - (d*(a + b*x))/(c + d* 
x))) + (2*B*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[1 - (d*(a + b*x)) 
/(b*(c + d*x))])/d^2 + ((A + B*Log[e*((a + b*x)/(c + d*x))^n])^2*Log[1 - ( 
d*(a + b*x))/(b*(c + d*x))])/d^2 + (2*B^2*n^2*PolyLog[2, (d*(a + b*x))/(b* 
(c + d*x))])/d^2 + (2*B*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*PolyLog[2 
, (d*(a + b*x))/(b*(c + d*x))])/d^2 - (2*B^2*n^2*PolyLog[3, (d*(a + b*x))/ 
(b*(c + d*x))])/d^2))/(2*b))
 

3.2.66.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2781
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + 
(e_.)*(x_))^(q_), x_Symbol] :> Simp[(-(f*x)^(m + 1))*(d + e*x)^(q + 1)*((a 
+ b*Log[c*x^n])^p/(d*f*(q + 1))), x] + Simp[b*n*(p/(d*(q + 1)))   Int[(f*x) 
^m*(d + e*x)^(q + 1)*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, 
d, e, f, m, n, q}, x] && EqQ[m + q + 2, 0] && IGtQ[p, 0] && LtQ[q, -1]
 

rule 2795
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + 
(e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[ 
c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b 
, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0 
] && IntegerQ[m] && IntegerQ[r]))
 

rule 2949
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d)^(m + 
1)*(g/b)^m   Subst[Int[x^m*((A + B*Log[e*x^n])^p/(b - d*x)^(m + 2)), x], x, 
 (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && Ne 
Q[b*c - a*d, 0] && IntegersQ[m, p] && EqQ[b*f - a*g, 0] && (GtQ[p, 0] || Lt 
Q[m, -1])
 

rule 2973
Int[((A_.) + Log[(e_.)*(u_)^(n_.)*(v_)^(mn_)]*(B_.))^(p_.)*(w_.), x_Symbol] 
 :> Subst[Int[w*(A + B*Log[e*(u/v)^n])^p, x], e*(u/v)^n, e*(u^n/v^n)] /; Fr 
eeQ[{e, A, B, n, p}, x] && EqQ[n + mn, 0] && LinearQ[{u, v}, x] &&  !Intege 
rQ[n]
 
3.2.66.4 Maple [F]

\[\int \left (b x +a \right ) {\left (A +B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )\right )}^{3}d x\]

input
int((b*x+a)*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^3,x)
 
output
int((b*x+a)*(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))^3,x)
 
3.2.66.5 Fricas [F]

\[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3 \, dx=\int { {\left (b x + a\right )} {\left (B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A\right )}^{3} \,d x } \]

input
integrate((b*x+a)*(A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^3,x, algorithm="frica 
s")
 
output
integral(A^3*b*x + A^3*a + (B^3*b*x + B^3*a)*log((b*x + a)^n*e/(d*x + c)^n 
)^3 + 3*(A*B^2*b*x + A*B^2*a)*log((b*x + a)^n*e/(d*x + c)^n)^2 + 3*(A^2*B* 
b*x + A^2*B*a)*log((b*x + a)^n*e/(d*x + c)^n), x)
 
3.2.66.6 Sympy [F(-2)]

Exception generated. \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3 \, dx=\text {Exception raised: HeuristicGCDFailed} \]

input
integrate((b*x+a)*(A+B*ln(e*(b*x+a)**n/((d*x+c)**n)))**3,x)
 
output
Exception raised: HeuristicGCDFailed >> no luck
 
3.2.66.7 Maxima [F]

\[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3 \, dx=\int { {\left (b x + a\right )} {\left (B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A\right )}^{3} \,d x } \]

input
integrate((b*x+a)*(A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^3,x, algorithm="maxim 
a")
 
output
3/2*A^2*B*b*x^2*log((b*x + a)^n*e/(d*x + c)^n) + 1/2*A^3*b*x^2 + 3*A^2*B*a 
*x*log((b*x + a)^n*e/(d*x + c)^n) + A^3*a*x + 3*(a*e*n*log(b*x + a)/b - c* 
e*n*log(d*x + c)/d)*A^2*B*a/e - 3/2*(a^2*e*n*log(b*x + a)/b^2 - c^2*e*n*lo 
g(d*x + c)/d^2 + (b*c*e*n - a*d*e*n)*x/(b*d))*A^2*B*b/e - 1/2*((B^3*b^2*d^ 
2*x^2 + 2*B^3*a*b*d^2*x)*log((d*x + c)^n)^3 - 3*(B^3*a^2*d^2*n*log(b*x + a 
) + (b^2*c^2*n - 2*a*b*c*d*n)*B^3*log(d*x + c) + (B^3*b^2*d^2*log(e) + A*B 
^2*b^2*d^2)*x^2 + (2*A*B^2*a*b*d^2 + (a*b*d^2*(n + 2*log(e)) - b^2*c*d*n)* 
B^3)*x + (B^3*b^2*d^2*x^2 + 2*B^3*a*b*d^2*x)*log((b*x + a)^n))*log((d*x + 
c)^n)^2)/(b*d^2) - integrate(-(B^3*a*b*c*d*log(e)^3 + 3*A*B^2*a*b*c*d*log( 
e)^2 + (B^3*b^2*d^2*x^2 + B^3*a*b*c*d + (b^2*c*d + a*b*d^2)*B^3*x)*log((b* 
x + a)^n)^3 + (B^3*b^2*d^2*log(e)^3 + 3*A*B^2*b^2*d^2*log(e)^2)*x^2 + 3*(B 
^3*a*b*c*d*log(e) + A*B^2*a*b*c*d + (B^3*b^2*d^2*log(e) + A*B^2*b^2*d^2)*x 
^2 + ((b^2*c*d + a*b*d^2)*A*B^2 + (b^2*c*d*log(e) + a*b*d^2*log(e))*B^3)*x 
)*log((b*x + a)^n)^2 + (3*(b^2*c*d*log(e)^2 + a*b*d^2*log(e)^2)*A*B^2 + (b 
^2*c*d*log(e)^3 + a*b*d^2*log(e)^3)*B^3)*x + 3*(B^3*a*b*c*d*log(e)^2 + 2*A 
*B^2*a*b*c*d*log(e) + (B^3*b^2*d^2*log(e)^2 + 2*A*B^2*b^2*d^2*log(e))*x^2 
+ (2*(b^2*c*d*log(e) + a*b*d^2*log(e))*A*B^2 + (b^2*c*d*log(e)^2 + a*b*d^2 
*log(e)^2)*B^3)*x)*log((b*x + a)^n) - 3*(B^3*a^2*d^2*n^2*log(b*x + a) + B^ 
3*a*b*c*d*log(e)^2 + 2*A*B^2*a*b*c*d*log(e) + (b^2*c^2*n^2 - 2*a*b*c*d*n^2 
)*B^3*log(d*x + c) + ((n*log(e) + log(e)^2)*B^3*b^2*d^2 + A*B^2*b^2*d^2...
 
3.2.66.8 Giac [F]

\[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3 \, dx=\int { {\left (b x + a\right )} {\left (B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A\right )}^{3} \,d x } \]

input
integrate((b*x+a)*(A+B*log(e*(b*x+a)^n/((d*x+c)^n)))^3,x, algorithm="giac" 
)
 
output
integrate((b*x + a)*(B*log((b*x + a)^n*e/(d*x + c)^n) + A)^3, x)
 
3.2.66.9 Mupad [F(-1)]

Timed out. \[ \int (a+b x) \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^3 \, dx=\int {\left (A+B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\right )}^3\,\left (a+b\,x\right ) \,d x \]

input
int((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))^3*(a + b*x),x)
 
output
int((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))^3*(a + b*x), x)